<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="./js/vue2.js"></script>
  </head>
  <body>
    <div id="app">
      <input
        @click="getAll(item.listval)"
        type="button"
        v-for="(item,index) in fromData"
        :value="item.listval"
      />
      <br />
      <span>{{ count }}</span>
    </div>
  </body>
  <script>
    var vm = new Vue({
      el: "#app",
      data: {
        fromData: [
          { listval: "点击" },
          { listval: "切换" },
          { listval: "滑动" },
          { listval: "触摸" },
          { listval: "双击" },
          { listval: "单击" },
          { listval: "全选" },
          { listval: "反选" },
          { listval: "彀中" },
          { listval: "删除" }
        ],
        count: "123"
      },
      methods: {
        getAll(val) {
          this.count = val;
        }
      }
    });
  </script>
</html>
